<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
    <router-view name="footer"></router-view>
  </div>
</template>

<script>
export default {
}
</script>

<style lang="scss">
@import '@/lib/reset.scss';

html, body, #app {
  // width: 100%;height: 100%;
  @include rect(100%, 100%);
}

#app {
  // display: -webkit-box; display: -ms-flexbox; display: flex;
  @include flexbox();
  // -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  @include flex-direction(column);
  .container {
    // -webkit-box-flex: 1; -ms-flex: 1; flex: 1; width: .1px;
    @include flex();
    @include rect(100%, auto); // 因为flex(),垂直方向默认宽度为.1px
    @include flexbox();
    @include flex-direction(column);
    .header {
      @include rect(100%, .42rem);
    }
    .content {
      @include flex();
			@include flex-direction(column);
      @include rect(100%, auto);
    }
  }
  .footer{
    @include rect(100%, 0.5rem);
    @include background-color(#efefef);
    ul{
      @include rect(100%, 100%);
      @include flexbox();
      li{
        @include flex();
        // 元素水平垂直居中
        @include flexbox();
        @include flex-direction(column);
        @include justify-content(); // justify-content:center
        @include align-items(); // align-items: center
        span{
          @include font-size(0.24rem);
        }
        p{
          @include font-size(0.12rem);
        }

        &.router-link-active{
          @include color(#f66);
        }
      }
    }
  }
}
</style>
